// components/homepageCmpt/index.js
// 首页组件库

import "./index.less";
import {Image, View} from "@tarojs/components";
import Taro from "@tarojs/taro";

export function FieldItem(props) {
    const {imgUrl, fieldId} = props;

    const goToAch = () => {
        Taro.navigateTo({
            url: '/pages/achSub/index?fieldId=' + fieldId
        })
    }

    return (
        <View className={"fieldItem"} onClick={goToAch}>
            <Image src={imgUrl}/>
        </View>
    )
}

